<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        var arr = ["你好",2,3,4,5];
        // for(var i = 0;i< arr.length;i++){
        //         var ele = arr[i];
        //         // if(ele > 1){
        //         //     break; //终止循环
        //         // }
        //         console.log(ele)
        //         if(ele > 1){
        //             continue; //终止本次循环
        //         }
        //         console.log(ele)
        // };
        arr.forEach(function(value,i){
            var ele = arr[i];
            console.log(i);
            // console.log(v)
        })
        var arr2 = ['a','b'];
        var arr3 = arr.concat(arr2);
        console.log(arr3[0])

        console.log(arr)
        console.log(arr.join(""))
        
        var arr4 = [1,2,3,4];
        console.log(arr4.splice(0,2))
        
        console.log(arr4)
    
       var arr5 = ["a","b"];
       delete arr5[0]
       console.log(arr5)
      
        function sum(a,b){
            console.log(a + b);

        }  
        sum(1,2);
        (function(a,b){
            
        })(1,2);
        // console.log(sums)
        var sums = function(){

        }
        var c = 10;
        function computed(a,b){
            var c = 2;
            return function(){
               return c;
            };
        }
        console.log(computed(1,2))
        var current = computed(3,5);
        console.log(current)
        var tem = computed(1,2);
        console.log(tem());
         //函数是当前环境的一等公民
    </script>
</body>
</html>